/**
 * 当前播放视频相关数据
 */


 import { createSlice } from "@reduxjs/toolkit";
 
 export interface VideoDataState {
   data: AnyObjType
 }
 
 
 const initialState: VideoDataState = {
   data: {}
 };
 
 
 
 export const VideoDataSlice = createSlice({
   name: "videoData",
   initialState,
   reducers: {
     setPosition(state,{ payload }){
        const { id,positionMillis } = payload;
        state.data[id] = positionMillis;
     }
   },
 });
 
 export const { setPosition } = VideoDataSlice.actions;
 
 